.my-input {
  display: inline-flex;
  width: 100%;
  height: auto;
  line-height: 16px;
  font-size: 14px;
  box-sizing: border-box;
  color: rgba(0, 0, 0, 0.8);
  border: 1px solid transparent;

  &.normal {
    border-radius: 8px;
    background: #f8f8f8;

    &:hover {
      background: #f5f5f5;
    }

    &:active {
      background: #eeeeee;
    }

    &.focus {
      background: #ffffff;
      border: 1px solid rgba(0, 0, 0, 0.07);
      box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.02);
    }
  }

  .my-input-center {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .my-input-input {
    position: relative;
    width: 100%;
    padding: 0 15px;
    line-height: 46px;

    &.large {
      line-height: 62px;

      .my-input-clear {
        top: 20px;
      }
    }

    input {
      border: none;
      outline: none;
      background: transparent;
      width: 100%;
      font-family: Arial, Helvetica, sans-serif;
      &::-webkit-input-placeholder {
        color: rgba(0, 0, 0, 0.2);
      }
    }
  }

  .my-input-textarea {
    position: relative;
    width: 100%;
    padding: 12px 15px 32px 15px;
    box-sizing: content-box;

    &.count-true {
      padding-bottom: 27px;
    }

    textarea {
      padding: 0;
      width: 100%;
      height: 100%;
      line-height: 1.5;
      border: none;
      outline: none;
      resize: none;
      background: transparent;
      font-family: Arial, Helvetica, sans-serif;
      &::-webkit-input-placeholder {
        color: rgba(0, 0, 0, 0.2);
      }
    }

    .my-input-textarea-footer {
      position: absolute;
      right: 16px;
      bottom: 4px;
      font-size: 12px;
      color: rgba(0, 0, 0, 0.4);
      line-height: 20px;

      .max-length-text {
        color: #ffab30;
      }
    }
  }

  .my-input-clear {
    display: block;
    position: absolute;
    top: 15px;
    right: 15px;
    width: 16px;
    height: 16px;
    cursor: pointer;
    background: url(../../assets/icon/cancel.png) center;
    background-size: cover;
  }

  &.allow-clear {
    .my-input-input,
    .my-input-textarea {
      padding-right: 46px;
    }
  }
}